//
//  MBPlayerManager.m
//  GC_OC
//
//  Created by Kris on 2023/5/20.
//

#import "MBPlayerManager.h"

@implementation MBPlayerManager
+ (instancetype)manager {
    
    static MBPlayerManager * player;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        player = [[MBPlayerManager alloc]init];
    });
    return player;
}
 

- (void)setCurrentPlayerHandle:(dispatch_block_t)currentPlayerHandle {
    if ([SUPlayerManager manager].isPlaying) { [[SUPlayerManager manager] pausePlay]; };
    if (_currentPlayerHandle) {
        _currentPlayerHandle();
    }
    _currentPlayerHandle = currentPlayerHandle;
    
}
@end
